package com.proxy.scanandcheck.scaner.thread;

import java.io.Serializable;
import java.util.concurrent.Callable;

import com.proxy.scanandcheck.scaner.service.ScannerService;
import com.proxy.scanandcheck.scaner.valueobject.IpAddress;


public class ScannerThreadPoolTask implements Callable<Boolean>, Serializable{

	private static final long serialVersionUID = 1570173370327662890L;
	
	private IpAddress ipAddress;
	
	public ScannerThreadPoolTask(IpAddress ipAddress)
	{
		this.ipAddress = ipAddress;
	}

	public Boolean call() throws Exception {
		ScannerService scannerService = new ScannerService();
		scannerService.scan(ipAddress);
		return ipAddress.isValid();
	}

}
